#ifndef XXACTIVITYMESSAGEVIEW_H
#define XXACTIVITYMESSAGEVIEW_H

#include <QWidget>
#include "XXactivityIndicatorView.h"
#include <functional>
#include <QLabel>

namespace Ui {
class XXactivityMessageView;
}

class XXactivityMessageView : public QWidget
{
    Q_OBJECT

public:
    explicit XXactivityMessageView(QWidget *parent = nullptr);
    ~XXactivityMessageView();

    XXactivityIndicatorView* indicatorView();
    void setWillCancel(QString text, std::function<bool(void)> block);

    Q_SLOT void message(QString message);
    Q_SLOT void show();
    Q_SLOT void hide();

private slots:
    void pushButton_cancel_onClicked();

private:
    Ui::XXactivityMessageView *ui;
    QLabel *_messageLabel;
};

#endif // XXACTIVITYMESSAGEVIEW_H
